#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QFileInfo>
#include <QListWidgetItem>
#include <QMainWindow>
#include <qmediaplaylist.h>

QT_BEGIN_NAMESPACE

class QMediaPlayer;
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    enum playModel
    {
        order,listing,single,random
    };

//    enum stowStatus
//    {
//        noStow,Stow,
//    };
//    struct favorElem
//    {
//        stowStatus statusFlag=noStow;
//        QString name;
//    };
//    favorElem element;

private slots:

    void on_StartBtn_clicked();

    void on_PreBtn_clicked();

    void on_Nextbtn_clicked();

    void on_volume_btn_clicked();

    void on_opneFile_clicked();

    void on_volumSlider_valueChanged(int value);

    void on_progressSlider_valueChanged(int value);

    void on_volumSlider_sliderMoved(int position);

    void on_listWidget_doubleClicked(const QModelIndex &index);

    void on_comboBox_activated(int index);

    void on_lineEdit_editingFinished();

    void on_Search_clicked();

    void on_stowBtn_clicked();

private:
    QMediaPlayer *m_player;
    QMediaPlaylist* m_playerList;
    QString url;
    Ui::MainWindow *ui;
    QStringList fileList;
    QVector<QString>nameElements{};
    QString preferSong;
private:
    void errorMessgBox();
};
#endif // MAINWINDOW_H
